#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    string s;
    vector<string> ans;
    while (cin >> s)
    {
        ans.push_back(s);
    }
    auto rit = ans.rbegin();
    while (rit != ans.rend())
    {
        cout << *rit << " ";
        ++rit;
    }
    return 0;
}